﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using System;
using System.Windows;

namespace WpfApplication2
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void btnCalculate_Click(object sender, RoutedEventArgs e)
        {
            // 1. 读取输入温度
            if (double.TryParse(txtInputTemp.Text, out double temp))
            {
                // 2. 判断温度并显示结果
                lblResult.Content = temp > 30 ? "温度 > 30！" : "温度 ≤ 30";
                // 3. 显示温湿度范围
                txtHumTempRange.Text = "温度范围：-10~50℃，湿度范围：30%~80%";
            }
            else
            {
                lblResult.Content = "请输入有效数字！";
            }
        }
    }
}
